package entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 统计结果使用的类
 */
@Data
@AllArgsConstructor
public class CountResult {
    /**
     * 庄家胜利次数
     */
    Integer countBanker;
    /**
     * 闲家胜利次数
     */
    Integer countPlayer;
    /**
     * 和局数次
     */
    Integer countDraw;
    /**
     * 策略失败次数
     */
    Integer failTime;
    /**
     * 策略成功次数
     */
    Integer winTime;

    /**
     * 盈利
     */
    Integer profit;

    /**
     * 对局次数
     */
    Integer gameTime;

    public void probability() {
        int total = countBanker + countPlayer + countDraw;
        System.out.printf("%.8f  ", (float) countBanker / total);
        System.out.printf("%.8f  ", (float) countPlayer / total);
        System.out.printf("%.8f%n", (float) countDraw / total);
    }

    public CountResult() {
        gameTime = 0;
        profit = 0;
        winTime = 0;
        failTime = 0;
    }
}
